package com.shoux.api.web.entity.apiData;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaoZhi
 * @since 2022-03-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("interface_table")
@ApiModel(value="InterfaceTableEntity对象", description="")
public class InterfaceTableEntity extends Model<InterfaceTableEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "接口名")
    private String name;

    @ApiModelProperty(value = "接口链接")
    private String url;

    @ApiModelProperty(value = "cron表达式")
    private String crons;

    @ApiModelProperty(value = "状态(0正常1停用)")
    private Integer status;

    @ApiModelProperty(value = "时效性（0实时，1非实时，2超长时间）")
    private Integer timeliness;

    @ApiModelProperty(value = "对应表主键id种类(0自增1UUID)")
    private Integer tableIdType;

    @ApiModelProperty(value = "运行种类（0 GET  1 POST）")
    private Integer requestType;

    @ApiModelProperty(value = "POST请求体")
    private String body;

    @ApiModelProperty(value = "成功状态码KEY")
    private String succeedKey;

    @ApiModelProperty(value = "成功状态码值")
    private String succeedValue;

    @ApiModelProperty(value = "数据返回字段")
    private String dataKey;

    @ApiModelProperty(value = "分页数量路径（params/pageSize）")
    private String pageSizePath;

    @ApiModelProperty(value = "页码字段路径（params/pageIndex）")
    private String pageIndexPath;

    @ApiModelProperty(value = "入参路径（params/pageSize）")
    private String paramsPath;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
